<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddBatchIdToTalentTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('talent', function (Blueprint $table) {
            $table->integer('batch_id')->default(0)->index()->comment('关联批次，备用');
            $table->integer('first_batch_id')->default(0)->index()->comment('一面关联批次');
            $table->integer('second_batch_id')->default(0)->index()->comment('二面关联批次');
            $table->integer('hr_batch_id')->default(0)->index()->comment('HR终面关联批次');

            $table->tinyInteger('tan_xin_status')->default(0)->index()->comment('谈薪是否成功，1成功2失败');
            $table->string('tan_xin')->default('')->comment('谈薪薪资');
            $table->string('tan_xin_a', 20)->default('')->comment('谈薪薪资单位k,w');
            $table->string('tan_xin_b', 20)->default('')->comment('谈薪薪资单位年,月');
            $table->string('tan_xin_reason')->default('')->comment('谈薪失败原因');
            $table->tinyInteger('tijian')->default(0)->index()->comment('体检1通过2不通过');
            $table->string('tijian_reason')->default('')->comment('体检不通过原因');
            $table->tinyInteger('send_offer')->default(0)->comment('发offer，1接受2不接受');
            $table->string('reject_offer_reason')->default('')->comment('拒绝offer回访记录原因');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('talent', function (Blueprint $table) {
            //
        });
    }
}
